<?php
/**
 * Created by PhpStorm.
 * User: spatra
 * Date: 14-11-16
 * Time: 上午12:37
 */

class Lesson_Student extends Eloquent
{
    public function student()
    {
        return $this->hasOne('User', 'id', 'student_id');
    }

    public function lesson()
    {
        return $this->hasOne('Lesson', 'id', 'lesson_id');
    }

    public function status()
    {
        return $this->hasOne('Lesson_Student_Status', 'id', 'status_id');
    }

    protected $table = 'lesson_students';

    protected $guarded = ['id'];
}